package com.controller;

import com.service.ChatService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/chat")
@RestController
public class ChatController {
    @Autowired
    private ChatService service;

    @ApiOperation(value = "插入chat表，返回账号密码")
    @PostMapping(value = "/insertChat")
    @ResponseBody
    public int insertChat(Integer userId){
        int count = service.insertChat(userId);
        return count;
    }

}
